/*
Author : 
	aziza yasser: 15898607
	sayli hidir: 06061308
*/

#include "Deque.h"
#include "Deque.cpp"


int main(int argc, char *argv[]) {
   	Deque que;
	int ch;
	int wert, num, date;
	while (1){
		cout <<"1.PushFront\n2.PopFront\n3.PushBack\n4.PopBack\n5.Display\n6.Exit  \n Enter your choice:";
    		cin >>ch; 
    		if(ch == 1){ 
			cout << "1. BaseEl 2. ListeEl \n Enter your choise:";
			cin >> ch;
			if(ch == 1){
				cout << "Wert:";
				cin >> wert;
				cout << "Num:";
				cin >> num;
				que.PushFront(new BaseEl(num,wert));
			} else {	
				cout << "Wert:";
				cin >> wert;
				cout << "Num:";
				cin >> num;
				cout << "Date:";
				cin >> date;
				que.PushFront(new ListeEl(wert, num, date));
			}
			continue;
		}


    		if(ch == 2) {
			que.PopFront(); continue;
		}

    		if(ch == 3) { 
			cout << "1. BaseEl 2. ListeEl \n Enter your choise:";
			cin >> ch;
			if(ch == 1)
			{
				cout << "Wert:";
				cin >> wert;
				cout << "Num:";
				cin >> num;
				que.PushBack(new BaseEl(wert, num));
			} else {
				cout << "Wert:";
				cin >> wert;
				cout << "Num:";
				cin >> num;
				cout << "Date:";
				cin >> date;
				que.PushBack(new ListeEl(wert, num, date));
			}
			continue;
		}

		if(ch == 4){
 			que.PopBack(); 
			continue;
		}
		if(ch == 5){ 
			que.display(); 
			continue;
		}
		if(ch == 6){
			break;
		}    			
  	}
	

	Deque g(que);
	g.display();
	g.PushFront(new ListeEl(2,2,2010));
	g.PushBack(new BaseEl(1,1));
	que = g;
//	g.display();
	que.display();
	return 0;
}

